			<div id="sidebar">
				<?php if(is_single() && is_active_sidebar('singlepost')) : ?>
					<?php dynamic_sidebar('singlepost'); ?>
				<?php else : ?>
					<?php if(is_active_sidebar('sidebar')) : ?>
						<?php dynamic_sidebar('sidebar'); ?>
					<?php else : ?>
							<div class="box" id="categories">
								<div class="title">
									<h2>Categories</h2>
								</div>
								
								<ul>
									<?php wp_list_categories('title_li='); ?>
								</ul>
							</div><!-- end categories -->
							
							<div class="box" id="meta">
								<div class="title">
									<h2>Meta</h2>
								</div>
								
								<ul>
									<?php wp_register(); ?>
									<li><?php wp_loginout(); ?></li>
									<?php wp_meta(); ?>
								</ul>
							</div><!-- end meta -->
						</div><!-- end box-->
					<?php endif; ?>
				<?php endif; ?>
				
			</div><!-- end sidebar -->